﻿<UserControl
    x:Class="CharmDemoGridApp.MyCharmFlyouts"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CharmDemoGridApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:cfo="using:CharmFlyoutLibrary"
    mc:Ignorable="d">
    <Grid>
        <cfo:CharmFlyout
            x:Name="cfoAbout"
            Heading="My About"
            HeadingBackgroundBrush="#FF4E0000">
            <StackPanel>
                <TextBlock
                    FontSize="16">CharmFlyout by John Michael Hauck</TextBlock>
                <TextBlock
                    FontSize="16">For support:</TextBlock>
                <HyperlinkButton
                    Click="OnMailTo">support@bing.com</HyperlinkButton>
            </StackPanel>
            <cfo:CharmFlyout.Logo>
                <Rectangle
                    Fill="Green"
                    Width="30"
                    Height="30" />
            </cfo:CharmFlyout.Logo>
        </cfo:CharmFlyout>
        <cfo:CharmFlyout
            x:Name="cfoSettings"
            Heading="My Settings"
            HeadingBackgroundBrush="#FF4E0000">
            <StackPanel>
                <TextBlock
                    FontSize="16">Setting A</TextBlock>
                <TextBlock
                    FontSize="16">Setting B</TextBlock>
                <TextBlock
                    FontSize="16">Setting C</TextBlock>
                <Grid
                    Background="#FF4E0000" HorizontalAlignment="Left">
                    <Button
                        Click="OnViewSubheading"
                        Content="View Sub-Settings" />
                </Grid>
            </StackPanel>
        </cfo:CharmFlyout>
        <cfo:CharmFlyout
            x:Name="cfoSubSettings"
            Heading="My Sub-Settings"
            HeadingBackgroundBrush="#FF4E0000"
            ParentFlyout="{Binding ElementName=cfoSettings}">
            <StackPanel>
                <TextBlock
                    FontSize="16">Sub-setting 1</TextBlock>
                <TextBlock
                    FontSize="16">Sub-setting 2</TextBlock>
            </StackPanel>
        </cfo:CharmFlyout>
    </Grid>
</UserControl>
